import { MergeConfigType, MergeConfigItem } from '@/components/FormPro/props';
import { getEditOrDetailConfig } from '@/components/FormPro/util';

export const getFormFileds = (type: MergeConfigType) => {
  const formBaseList: MergeConfigItem[] = [
    {
      label: '用户头像',
      filed: 'name',
      props: {
        col: {
          span: 24,
        },
      },
      slots: {
        component(x) {
          return <a-avatar size={104}>Arco</a-avatar>;
        },
      },
    },
    {
      label: '姓名',
      filed: 'time',
      props: {
        col: {
          span: 12,
        },
      },
    },
    {
      label: '角色',
      filed: 'time',
      props: {
        col: {
          span: 12,
        },
      },
    },
    {
      label: '手机号码',
      filed: 'name',
      props: {
        col: {
          span: 12,
        },
      },
    },
    {
      label: '创建时间',
      filed: 'ment11',
      props: {
        col: {
          span: 12,
        },
      },
    },
    {
      label: '',
      filed: 'n11ame',
      props: {
        col: {
          span: 24,
        },
        formItem: {
          hideLabel: true,
        },
      },
      component: 'a-divider',
    },
    {
      label: '邮箱',
      filed: 'ment11',
      props: {
        col: {
          span: 24,
        },
      },
    },
    {
      label: '昵称',
      filed: 'ment11',
      props: {
        col: {
          span: 24,
        },
      },
    },
    {
      label: '部门',
      filed: 'ment11',
      props: {
        col: {
          span: 24,
        },
      },
    },
    {
      label: '岗位',
      filed: 'ment11',
      props: {
        col: {
          span: 24,
        },
      },
    },
    {
      label: '个人简介',
      filed: 'ment11',
      props: {
        col: {
          span: 24,
        },
      },
    },
  ];

  return getEditOrDetailConfig(formBaseList, type);
};
